package com.example.administrator.officeplatform.Activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.administrator.officeplatform.R;

public class CostDetailActivity extends AppCompatActivity {
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cost_detail);
       final String index=(String)getIntent().getExtras().get("index");

        button = (Button)findViewById(R.id.fanhui);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent mIntent = new Intent();
                //把返回数据存入Intent
                mIntent.putExtra("index", index);
                //设置返回数据
                setResult(1, mIntent);
                finish();
            }
        });
    }
}
